package cn.sccl.common.web;

/**
 * *********************************
 *
 * @ClassName: WebNames.java
 * @Description: TODO
 * @author:
 * @createdAt: 2014-1-24上午11:46:11
 * *********************************
 */
public class WebNames {
    /**
     *
     */
    public final static String START = "paging.start";
    /**
     *
     */
    public final static String PAGESIZE = "paging.pageSize";
    /**
     *
     */
    public final static String CURRENT_PAGE = "paging.currentPage";
    /**
     *
     */
    public final static String TOTAL = "paging.total";
    /**
     *
     */
    public final static String PAGING = "paging";

	/* requestScope attribute keys */
    /**
     * OPERATION_TIPS
     */
    public static final String OPERATION_TIPS = "operationTips";

	/* context attribute keys */
    // public static final String COMPANIES ="companies";
    /**
     * BIZ_CODE_CATEGORIES
     */
    public static final String BIZ_CODE_CATEGORIES = "bizCodeCategories";
    /**
     *
     */
    public static final String BIZ_CODES = "bizCodes";

    public static final String ORGANIZATIONS = "organizations";

    /**
     *
     */
    public static final String ORGANIZATION_MANAGER = "organizationManager";
    /**
     *
     */
    public static final String USER_ORGANIZATION_MANAGER = "userOrganizationManager";
    /**
     *
     */
    public static final String USER_MANAGER = "userManager";
    /**
     *
     */
    public static final String OPERATION_TIP_MANAGER = "operationTipManager";
    /**
     *
     */
    public static final String BIZ_CODE_MANAGER = "bizCodeManager";
    /**
     *
     */
    public static final String BIZ_CODE_CATEGORY_MANAGER = "bizCodeCategoryManager";

    /**
     * session attribute keys
     */
    public static final String USER_LOGIN_NAME = "SPRING_SECURITY_LAST_USERNAME";
    /**
     *
     */
    public static final String FILE_UPLOAD_STATUS = "fileUploadStatus";
    /**
     * busi data mc
     */
    public static final String MEMCACHED_CLIENT = "memcachedClient";
    /**
     * lock mc
     */
    public static final String MEMCACHED_CONCURRENT_CLIENT = "memcachedConcurrentClient";


    // 当前登陆账户基本信息--用户名称
    /**
     *
     */
    public static final String SESSION_CURRENT_USER_NAME = "SESSION_CURRENT_USER_NAME";
    // 当前登陆账户基本信息--用户ID
    /**
     *
     */
    public static final String SESSION_CURRENT_USER_ID = "SESSION_CURRENT_USER_ID";
    // 当前登陆账户基本信息--省份CODE
    /**
     *
     */
    public static final String SESSION_CURRENT_PROVINCE_CODE = "SESSION_CURRENT_PROVINCE_CODE";

    /**
     * 定时任务锁定同步锁 抽取点评对象
     */
    public static final String LOCK_TASK_JOB_COMMENT_OBJ = "LOCK_TASK_JOB_COMMENT_OBJ";

    // 缓存操作类型
    /**
     * 一个用户对应多组织改造：、
     * zhouxinxi 2014-8-8
     * 用户基本信息缓存前缀（MC key = CACHE_USER_BASIC_PREFIX_HR_+HR_LOGIN_ID）
     */
    public static final String CACHE_USER_BASIC_PREFIX_HR = "CACHE_USER_BASIC_PREFIX_HR_";
    /**
     * 用户基本信息缓存前缀（MC key = CACHE_USER_BASIC_PREFIX+LOGIN_ID）
     */
    public static final String CACHE_USER_BASIC_PREFIX = "CACHE_USER_BASIC_PREFIX_";

    ;

    /********************************************* cache keys  start***************************************/
    // public static final String CACHE_ALL_AUTHORITIES
    // ="CACHE_ALL_AUTHORITIES"; // 缓存所有的菜单权限
//	/**
//	 * 个人收藏夹缓存前缀（MC key= CACHE_PERSONAL_FAVORITY_AUTHORITIES_PREFIX+USER_ID）
//	 */
    // public static final String CACHE_PERSONAL_FAVORITY_AUTHORITIES_PREFIX =
    // "CACHE_PERSONAL_FAVORITY_AUTHORITIES_";
//	/**
//	 * 缓存所有【个人收藏夹缓存】KEYS
//	 */
    // public static final String CACHE_PERSONAL_FAVORITY_AUTHORITIES_ALL_KEYS =
    // "CACHE_PERSONAL_FAVORITY_AUTHORITIES_ALL_KEYS";
    /**
     * 用户角色信息缓存 前缀（MC key = CACHE_USER_ROLE_PREFIX +USER_ID）
     */
    public static final String CACHE_USER_ROLE_PREFIX = "CACHE_USER_ROLE_";                //根据用户ID存储用户的角色列表
    /**
     * 根据用户ID存储用户的角色ID列表
     */
    public static final String CACHE_USER_ROLE_USERID_PREFIX = "CACHE_USER_ROLE_USERID_";//根据用户ID存储用户的角色ID列表
    /**
     * MC KEY = CACHE_ROLE_USER_PREFIX +ROLE_ID
     */
    public static final String CACHE_ROLE_USER_PREFIX = "CACHE_ROLE_USER_PREFIX_";        // 缓存某个角色关联的用户ID列表
    /**
     * 角色权限信息缓存（MC key = CACHE_ROLE_PREFIX + ROLE_ID）
     */
    public static final String CACHE_AUTHKEYS_PREFIX = "CACHE_ROLE_AUTHORITY_ROLE_";
    /**
     *
     */
    public static final String CACHE_ROLE_AUTHORITY_PREFIX = "CACHE_ROLE_AUTHORITY_";
    /**
     * MC KEY =CACHE_AUTHORITY_ROLE_PREFIX+ AUTH_ID
     */
    public static final String CACHE_AUTHORITY_ROLE_PREFIX = "CACHE_AUTHORITY_ROLE_PREFIX_";    // 缓存某个权限对应的角色ID列表
    public static final String CACHE_USER_AUTHORITYS_PREFIX = "CACHE_USER_AUTHORITYS_PREFIX_";//缓存用户的菜单
    /**
     * messgae cache key
     */
    public static final String CACHE_MESSAGES_PREFIX = "CACHE_MESSAGES_";
    /**
     * BIZ_CATEGORY CACHE KEY 前缀(MC KEY =CACHE_BIZ_CATEGORY_PREFIX+CATEGORY )
     */
    public static final String CACHE_BIZ_CATEGORY_PREFIX = "CACHE_BIZ_CATEGORY_";
    /**
     * organization CACHE KEY 前缀（MC KEY = CACHE_ORGANIZATION_PREFIX+ORG_NO）
     */
    public static final String CACHE_ORGANIZATION_PREFIX = "CACHE_ORGANIZATION_";
    /**
     *
     */
    public static final String CACHE_ALL_AUTHORITIES = "CACHE_ALL_AUTHORITIES";
    /**
     * 根据type缓存菜单表
     */
    public static final String CACHE_AUTHORITIES_BY_TYPE = "CACHE_AUTHORITIES_BY_TYPE_";
    /**
     * 缓存所有的流程类型
     */
    public static final String CACHE_ALL_UNIFLOW_PROCESSES = "CACHE_ALL_UNIFLOW_PROCESSES";
    /**
     * 缓存用户的待办数据
     */
    public static final String CACHE_PERSIONAL_WORKLIST = "CACHE_WORKLIST_";
    /**
     * 根据用户的ID缓存用户的组织机构
     */
    public static final String CACHE_ORGANIZATION_BY_USERID = "CACHE_ORG_USERID_";
    /**
     * 根据编码缓存接口配置
     */
    public static final String CACHE_INTERFACEMAPPING_CODE = "CACHE_IFMAPPING_CODE_";
    /**
     * 根据区域缓存接口配置
     */
    public static final String CACHE_INTERFACEMAPPING_BUSINESS = "CACHE_IFMAPPING_BUSINESS_TAREA_";
    /**
     * 根据供应商名称存储供应商信息
     */
    public static final String CACHE_PROVIDER_NAME = "CACHE_PROVIDER_NAME_";
    /**
     * 根据组织机构ID存储组织机构编码
     */
    public static final String CACHE_ORGCODE_BY_ID = "CACHE_ORGCODE_BY_ID";
    /**
     * 根据用户ID缓存用户DTO
     */
    public static final String CACHE_USERORGDTO_BY_ID = "CACHE_USERORGDTO_BY_ID_";
    /**
     * 根据物料编码查询产品分类编码
     */
    public static final String CACHE_PURCODE_BY_MATERIALCODE = "CACHE_PURCODE_BY_MATERIALCODE_";
    /**
     * 根据物料编码查询产品分类编码
     */
    public static final String CACHE_BIZ_CODES_TYPE = "CACHE_BIZ_CODES_TYPE_";
    /**
     * 根据物料编码查询产品分类编码
     */
    public static final String CACHE_CONTRACR_CODE_BY_MWC_AND_CONTRACTID = "CACHE_CONTRACTCODE_MWCID_";
    /**
     * 根据物料编码查询产品分类编码
     */
    public static final String CACHE_CONTRACR_CODE_BY_CONTRACTID = "CACHE_CONTRACTCODE_CID_";
    /**
     * 个人收藏夹
     */
    public static final String CACHE_PERSONAL_FAVORITY_AUTHORITIES_PREFIX = "CACHE_PERSONAL_FAVORITY_";
    /**
     *
     */
    public static final String CACHE_PERSON_TAB_PREFIX = "CACHE_PERSON_TAB_";
    public static final String CACHE_PROVIDERDTOS_PREFIX = "CACHE_PROVIDERDTOS_";
    public static final String CACHE_MATERIAL_DATA_PREFIX = "CACHE_MATERIAL_BY_CODE_";
    /**
     * 流程 统一待办过来的 参数标识
     */
    public static final String UNIFLOW = "uniflow";
    /**
     * 流程参数的key
     */
    public static final String RELEVANT_DATA = "relevantData";
    /**
     * 同步锁份额调整申请key
     */
    public static final String LOCKCONTRACTSHAREADJUST = "LOCKCONTRACTSHAREADJUST";
    /**
     * 同步锁份额调整key
     */
    public static final String LOCKCONTRACTADJUST = "LOCKCONTRACTADJUST";
    /**
     * 同步锁份额调整完成key
     */
    public static final String LOCKCONTRACTADJUSTFINISH = "CONTRACTADJUSTFINISH";
    /**
     * 同步锁业务编码
     */
    public static final String LOCK_SEQUENCE_PREFIX = "CACHE_SEQUENCE_";
    /**
     * 任务分配锁
     */
    public static final String LOCK_MCDATA_LOADER = "LOCK_MCDATA_TASK_DEV";
    /**
     * ****************************************** cache keys  end**************************************
     */

    public final static String UTF_8 = "utf-8";
    /**
     * SESSION失效、无法获取上下文环境异常消息定义
     */
    public final static String EXCEPTION_CODE_CONTEXT_DISABLE = "session disabled or lose context";
    public final static String UNIFLOWTASK_MANAGER = "uniflowTaskManager";//待办任务默认参数名
    public final static String S_SYSTEM_ALIS = "s_system";//标识来源系统参数
    public final static String S_SYSTEM_CGFZ = "cgfz";//标识为采购辅助内部系统请求标识
    public final static boolean IS_JT = Boolean.TRUE;//标识是否集团的应用
    public final static String JT_CODE_HQ = "@HQ";//集团账号标识
    public static Integer HTFLAG = 1;
    public static Integer SAPFLAG = 1;
    public static String WS_Connection = "Close";//使用活动链接
    public static Boolean WS_UseCaches = true;    //使用缓存
    public static int WS_CON_TIME_OUT = 60000;//默认60000ms
    public static String DEPTCODE_FOR_SESSION = "deptCodeForSession";//用于各辅助系统之间进行部门切换的参数名称 zhouxinxi 2014-9-11
    public static String DEPTCODE_FOR_SESSION_INNER = "deptCodeForSession_inner";//用于采购辅助内部进行部门切换的参数名称 zhouxinxi 2014-10-17
    public static String ws_timeout = "ws_timeout";//接口超时时间码表category
    /**
     * 切换用户任职地改造： 为了兼容采购辅助用户存在不同省份，不同公司，不同部门多个任职的情况
     * 进入单点登录之后，要剔除WebNames.HR_ID_FOR_SESSION参数,把参数名替换成111
     * zhouxinxi 2015-12-11
     */
    public static String HR_ID_FOR_SESSION = "hrIdForSession";//用于各系统之间进行省份-公司-部门切换的参数名称 zhouxinxi 2015-12-11
    public static String HR_ID_FOR_SESSION_INNER = "hrIdForSession_inner";//用于采购辅助内部切换时的参数名称 zhouxinxi 2015-12-11
    public static String[] WORKFLOW_TASK_URL = {"/uniflowtask/executeWorkitem.do", "/uniflowtask/executeVirtualBusiTask.do", "/uniflowtask/executeReadflow.do"};//待办任务链接默认前缀
    public static String WORKFLOW_TASK_TIID = "tiid";//待办任务默认参数名
    /**
     * 会签节点流程参数
     */
    public static String SIGN_PARTICIPANT_PARAM = "signParticipantLoginId";

    /**
     * @param provinceCode 省份标识，目前没啥用（预留）
     * @return int 超时时间
     * @throws
     * @Title: getWsTimeOut
     * @Description: 动态获取接口超时时间
     * @createdBy:zhouxinxi
     * @createdAt: 2014-12-12上午11:20:22
     */
    public static int getWsTimeOut(String provinceCode) {
        int default_timeOut = WS_CON_TIME_OUT;
        return default_timeOut;
    }

    /**
     * end
     */
    /**
     *
     */
    public enum CacheOpType {
        /**
         *
         */
        INSERT("INSERT"), DELETE("DELETE"), UPDATE("UPDATE"), UPDATE_PATIAL("UPDATE_PATIAL"), GET("GET"), SET("SET"), OTHER("OTHER");
        /**
         *
         */
        private String value = null;


        /**
         * <p>
         * Title:
         * </p>
         * <p>
         * Description:
         * </p>
         *
         * @param value value
         */
        CacheOpType(String value) {
            this.value = value;
        }


        /**
         * @return String
         * @Title: toString
         * @Description:
         * @createdBy:
         * @createaAt:2014-1-24上午11:48:18
         */
        @Override
        public String toString() {
            return this.value;
        }
    }


    /**
     * *********************************
     *
     * @ClassName: DataHistoryEnum
     * @Description: 历史数据
     * @author: bieby
     * @createdAt: 2013-12-6下午03:35:23
     * *********************************
     */
    public enum DataHistoryEnum {
        /**
         *
         */
        最近一年("1"), 最近两年("2"), 最近三年("3"), 最近五年("5"), 全部("100");
        /**
         *
         */
        private final String value;


        /**
         * <p>
         * Title:
         * </p>
         * <p>
         * Description:
         * </p>
         *
         * @param type type
         */
        DataHistoryEnum(String type) {
            this.value = type;
        }


        /**
         * @return String
         * @Title: getValue
         * @Description: TODO
         * @createdBy:
         * @createaAt:2014-1-24上午11:48:27
         */
        public String getValue() {
            return this.value;
        }
    }
}
